<?php 
namespace app\admin\validate;
use app\admin\code\BaseCode;

class UserValidate extends BaseValidate
{
    protected $_rule = [
        'id'      =>  'require',
        'mobile'    =>  'require',
        'is_use'  =>  'require|in:0,1',
    ];
    protected $_field = [
        'id'=>'用户',
        'name'=>'手机号码',
        'is_use'=>'当前状态',
    ];
    protected $_message = [
        'id.require' => BaseCode::PARAM_CANT_EMPTY,
        'mobile.require' => BaseCode::PARAM_CANT_EMPTY,
        'is_use.in' => BaseCode::PARAM_MUST_IN,
        'is_use.require' =>BaseCode::PARAM_CANT_EMPTY,
    ];
    protected $_scene = [
        'update_status'    => ['id','is_use'],
    ];
    protected $_extend_rule = ['check_child_exist'];

}


